libMymath.so:add.o sub.o
	g++ -shared -o $@ $^

%.o:%.cpp
	g++ -fPIC -c $<

.PHONY:output
output:
	mkdir output
	cp *.h output/
	cp libMymath.so output/
	g++ test.cpp -I./output -L./output -lMymath

.PHONY:clean
clean:
	rm -rf libMymath.so *.o output a.out
